#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "platform.h"


void* buffer_malloc(void* pbuf,uint bufSize)
{
    pbuf = malloc(bufSize);
    assert(pbuf!=NULL);

    return pbuf;
}

Ret_Status buffer_free(void* pbuf,uint bufSize)
{
    assert(pbuf!=NULL);

    free(pbuf);
    memset(pbuf,0x0,sizeof(bufSize));

    return SUCCESS;
}

#ifdef __MAIN__
int main(int argc,char** argv)
{
    char* pchar=NULL;

    pint = (char*)buffer_malloc(pint,100);
    strcpy(pchar,"Encoding unknown!");
    printf("%s\n",pchar);

    buffer_free(pchar,100);

    return 1;
}
#endif
